<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">

<ui:composition>
    <span id="span_#{id}">
        <input id="timeRefresherReq" name="timeRefresherReq" value="false" type="hidden"/>
        <h:commandButton style="display:none;">
            <f:ajax event="click" render="#{render}" onerror="ajaxErrorsHandler"/>
        </h:commandButton>

        <script type="text/javascript">
            function onTimer_#{id}() {
                var span = document.getElementById('span_#{id}');
                var inputs = span.getElementsByTagName('input');
                inputs.item(0).value = 'true';
                inputs.item(1).click();
            }

            window.setInterval(onTimer_#{id}, #{interval});
        </script>
    </span>
</ui:composition>

</html>